// IAnsiScreen.h: interface for the IVirtualScreen class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IANSISCREEN_H__25AADB22_C397_4B0B_99B2_2BCA0893C2C1__INCLUDED_)
#define AFX_IANSISCREEN_H__25AADB22_C397_4B0B_99B2_2BCA0893C2C1__INCLUDED_

#include "AnsiConstsDef.h"

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

interface ICaretMovement
{
	virtual void GotoXY(int x, int y) = 0;
	virtual void MoveUp(int offset) = 0;
	virtual void MoveDown(int offset) = 0;
	virtual void MoveLeft(int offset) = 0;
	virtual void MoveRight(int offset) = 0;
	virtual void SaveCursor() = 0;
	virtual void UnsaveCursor() = 0;
};

interface IDisplayAttribute
{
	virtual void ResetAttribute() = 0;
	virtual void SetForecolor(ANSI_COLOR color) = 0;
	virtual void SetBackcolor(ANSI_COLOR color) = 0;
	virtual void SetHighlight(BOOL bHighlight) = 0;
	virtual void SetUnderline(BOOL bUnderline) = 0;
	virtual void SetBlink(BOOL bBlink) = 0;
	virtual void SetInverse(BOOL bInverse) = 0;
};

typedef enum enumEraseType
{
	EraseToEOL,
	EraseToBOL,
	EraseLine,
	EraseToEOS,
	EraseToBOS,
	EraseScreen,
	
} EraseType;

interface IScreenAction
{
	virtual void SetSize(int rows, int cols) = 0;
	virtual void Erase(EraseType type) = 0;

	virtual void PutC(char c) = 0;
	virtual void SetCursor(HCURSOR hCursor) = 0;
	virtual void InsertLine(int lineCount) = 0;

	virtual void Update() = 0;
};

//typedef enum enumScreenEffect
//{
#define EffectNone 0x0
#define EffectHighlight 0x01
#define EffectUnderline 0x02
#define EffectInverse 0x04
//} BYTE;

interface IScreenEffect
{
	virtual void SetEffect(int x, int y, BYTE effect) = 0;
	virtual BYTE GetEffect(int x, int y) = 0;
};

interface IAnsiScreen : 
		public ICaretMovement, 
		public IDisplayAttribute, 
		public IScreenAction,
		public IScreenEffect
{

};

#endif // !defined(AFX_IANSISCREEN_H__25AADB22_C397_4B0B_99B2_2BCA0893C2C1__INCLUDED_)
